<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title></title>
    <link rel="stylesheet" href="./css/section.css">
    <script src="../../../../lib/axios.js"></script>
    <script src="../../../../lib/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        
        html, body{
            height: 100%;
        }
        ul li{
            list-style: none;
        }
        a{
            text-decoration: none;
            
        }
        a:link{
            color: #404040;
        }
        a:visited{
            color: #404040;
        }
        a:hover{
            color: #404040;
        }
        a:active{
            color: #404040;
        }
        ::-webkit-scrollbar{
            /* width: 0; 移动端取消滚动条无效*/
            display: none;
        }
        body{
            background: #EDEDED;/*#2493f1*/
            display: flex;
            flex-direction: column;
            font-family: 微软雅黑;
            font-size: .3865rem;
            letter-spacing: .0169rem;/*
            position: relative;*/
            overflow: hidden;/*禁止上下滑动*/
            -webkit-user-select:none;
            -moz-user-select:none;
            -ms-user-select:none;
            user-select:none;
        }
        header{
            background-color: #ffffff !important;

        }
        
        section{/*
            border: 1px solid red;*/
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            align-items: center;/*

            position: relative;*/
        }









        


        
    </style>
    <link rel="stylesheet" href="../../../../css/header.css">
    <!-- 引入样式文件 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.2/lib/index.css" referrerpolicy="no-referrer"/>
    <script src="../../../../lib/vue.js"></script>
    
</head>
<body>
    <header>
        <div class="backBtn"></div>
        <div class="left"></div>
        <span class="title"></span>
        <div class="right"></div>
        <style>
            header .title{
                font-weight: 400;
            }
            header .right{
                width: 1.1rem;
                height: 1.1rem;
                box-sizing: border-box;
                background-image: url(../../../../images/header/more.webp);
                background-size: .628rem .628rem;
                background-position: center;
                background-repeat: no-repeat;
                position: absolute;
                bottom: 0;
                right: 0;
            }
        </style>
    </header>
    <script>
        document.querySelector(".backBtn").onclick=function(){
            window.history.go(-1)
        }
        document.querySelector("header .right").onclick=function(){
            //window.history.go(-1)

        }
    </script>
    <section>
         <div class="box">
            <!-- top -->
            <ul class="userInfo">
                <li class="infor1">
                    <div class="img">
                        <img :src="userInfo.userImg != '' ? userInfo.userImg : '../../../../images/person/person_senter/defaultUserImg.webp'" alt="">
                    </div>
                    <div class="info">
                        <div class="noteNameBox">
                            <span class="noteName">{{(userInfo.isMyFriend ? userInfo.note : userInfo.name) == "" ? "无名用户" : (userInfo.isMyFriend ? userInfo.note : userInfo.name)}}</span>
                            <span><img :src="userInfo.gender == '女' ? './img/gender_woman.webp' : './img/gender_man.webp'" alt=""></span>
                        </div>
                        <div v-if="userInfo.isMyFriend">
                            <span>昵称:</span>
                            <span>{{userInfo.name}}</span>
                        </div>
                        <div>
                            <span v-if="userInfo.isMyFriend">ID:</span>
                            <span>{{userInfo.ID}}</span>
                        </div>
                        <div>
                            <span>地区:</span>
                            <span>
                                {{userInfo.province != '' ? userInfo.province.split("省")[0] : ''}}
                                {{userInfo.city == "" ? '' : `&nbsp;${userInfo.city.split("市")[0]}`}}
                            </span>
                        </div>
                        
                    </div>
                </li>
                <li class="note infor2" :style="userInfo.isMyFriend ? {} : {'border-top': '.0121rem solid #ececec'}" @click="note()">
                    <span class="title">备注和标签</span>
                    <span class="icon"></span>
                    <hr class="bottom">
                </li>
                <li class="tel infor2" v-if="userInfo.isMyFriend">
                    <span class="title">电话</span>
                    <span class="val">{{userInfo.phone}}</span>
                    <hr class="bottom">
                </li>
                <li class="purview infor2" v-if="userInfo.isMyFriend">
                    <span class="title">朋友权限</span>
                    <span class="icon"></span>
                    <hr class="bottom">
                </li>
                <li class="community marginTop infor2">
                    <span class="title">帮友圈</span>
                    <span class="imgs">
                        <img v-for="(item, index) in userInfo.imgList" :src="item" alt="">
                    </span>
                    <span class="icon"></span>
                    <hr class="bottom">
                </li>
                <li class="more infor2">
                    <span class="title">更多信息</span>
                    <span class="icon"></span>
                    <hr class="bottom">
                </li>
                <li class="btns marginTop send" v-if="isMyFriend || userInfo.isMyFriend" @click.stop="toSend()">
                    <span class="msgIcon sendmessage"></span>
                    <span class="title">发消息</span>
                </li>
                <li class="btns" v-if="isMyFriend || userInfo.isMyFriend">
                    <span class="msgIcon video"></span>
                    <span class="title">音视频通话</span>
                </li>
                <li class="btns marginTop" v-if="isMyFriend || (userInfo.isMyFriend == false)" @click="addFriend()">
                    <span class="title">添加帮友</span>
                </li>
                
            </ul>
            <!-- 输入框 -->
            <van-dialog v-model="show" title="好友备注" confirm-button-color='#576B95' cancel-button-color='#000' show-cancel-button :lazy-render="false" @cancel="cancel()" @confirm="confirm()">
                <van-field
                type="textarea"
                v-model="editnote"
                rows="2"
                autosize
                autofocus
                maxlength="16"
                :placeholder="userInfo.name"
                show-word-limit
                class="message"
                />
            </van-dialog>
            

         </div>  

        
    </section>
    <style>
        .message {
            .van-field {
            border: 1px solid #e2e2e2;
            width: 90%;
            margin: 12px auto 28px auto;
            background: #f6f6f6;
            }
        }
    </style>

    

    
    
    
    
    <script src="https://cdn.jsdelivr.net/npm/vant@2.2/lib/vant.min.js" referrerpolicy="no-referrer"></script>
    <script src="./js/main.js"></script>
    
    <script>
        function resetHtmlFont(){
            document.documentElement.style.fontSize = screen.width/10 + 'px';
        }
        resetHtmlFont();
        window.onresize = resetHtmlFont;
    </script>
</body>
</html>